package com.liusand.controller;

import com.liusand.common.Result;
import com.liusand.mapper.CategoryMapper;
import com.liusand.pojo.Category;
import com.liusand.service.CategoryService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author :liusha
 * packageName :com.liusand.controller
 * fileName :CategoryController
 * creationTime :2022/12/1 18:25
 */
@RestController
@RequestMapping("category")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;


    @GetMapping("list")
    public Result list(){
        List<Category> list = categoryService.list(0);
        return Result.success(list);
    }
}
